
class HomeFirstListModel {
  List<HomeFirstListItem>? list;
  int? pageNum;
  int? pageSize;
  int? total;
  int? totalPage;

  HomeFirstListModel({this.list, this.pageNum, this.pageSize, this.total, this.totalPage});

  HomeFirstListModel.fromJson(Map<String, dynamic> json) {
    list = json["list"] == null ? null : (json["list"] as List).map((e) => HomeFirstListItem.fromJson(e)).toList();
    pageNum = json["pageNum"];
    pageSize = json["pageSize"];
    total = json["total"];
    totalPage = json["totalPage"];
  }

  static List<HomeFirstListModel> fromList(List<Map<String, dynamic>> list) {
    return list.map(HomeFirstListModel.fromJson).toList();
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> _data = <String, dynamic>{};
    if(list != null) {
      _data["list"] = list?.map((e) => e.toJson()).toList();
    }
    _data["pageNum"] = pageNum;
    _data["pageSize"] = pageSize;
    _data["total"] = total;
    _data["totalPage"] = totalPage;
    return _data;
  }

  HomeFirstListModel copyWith({
    List<HomeFirstListItem>? list,
    int? pageNum,
    int? pageSize,
    int? total,
    int? totalPage,
  }) => HomeFirstListModel(
    list: list ?? this.list,
    pageNum: pageNum ?? this.pageNum,
    pageSize: pageSize ?? this.pageSize,
    total: total ?? this.total,
    totalPage: totalPage ?? this.totalPage,
  );
}

class HomeFirstListItem {
  String? activityTag;
  List<dynamic>? carousel;
  String? coverImageUrl;
  String? daoHeadImageUrl;
  int? daoId;
  String? daoName;
  int? firstPublishCount;
  String? firstPublishPrice;
  String? id;
  String? productName;
  String? productType;
  int? showCount;
  int? showSoldCount;
  int? sourceId;

  HomeFirstListItem({this.activityTag, this.carousel, this.coverImageUrl, this.daoHeadImageUrl, this.daoId, this.daoName, this.firstPublishCount, this.firstPublishPrice, this.id, this.productName, this.productType, this.showCount, this.showSoldCount, this.sourceId});

  HomeFirstListItem.fromJson(Map<String, dynamic> json) {
    activityTag = json["activityTag"];
    carousel = json["carousel"] ?? [];
    coverImageUrl = json["coverImageUrl"];
    daoHeadImageUrl = json["daoHeadImageUrl"];
    daoId = json["daoId"];
    daoName = json["daoName"];
    firstPublishCount = json["firstPublishCount"];
    firstPublishPrice = json["firstPublishPrice"];
    id = json["id"];
    productName = json["productName"];
    productType = json["productType"];
    showCount = json["showCount"];
    showSoldCount = json["showSoldCount"];
    sourceId = json["sourceId"];
  }

  static List<HomeFirstListItem> fromList(List<Map<String, dynamic>> list) {
    return list.map(HomeFirstListItem.fromJson).toList();
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> _data = <String, dynamic>{};
    _data["activityTag"] = activityTag;
    if(carousel != null) {
      _data["carousel"] = carousel;
    }
    _data["coverImageUrl"] = coverImageUrl;
    _data["daoHeadImageUrl"] = daoHeadImageUrl;
    _data["daoId"] = daoId;
    _data["daoName"] = daoName;
    _data["firstPublishCount"] = firstPublishCount;
    _data["firstPublishPrice"] = firstPublishPrice;
    _data["id"] = id;
    _data["productName"] = productName;
    _data["productType"] = productType;
    _data["showCount"] = showCount;
    _data["showSoldCount"] = showSoldCount;
    _data["sourceId"] = sourceId;
    return _data;
  }

  HomeFirstListItem copyWith({
    String? activityTag,
    List<dynamic>? carousel,
    String? coverImageUrl,
    String? daoHeadImageUrl,
    int? daoId,
    String? daoName,
    int? firstPublishCount,
    String? firstPublishPrice,
    String? id,
    String? productName,
    String? productType,
    int? showCount,
    int? showSoldCount,
    int? sourceId,
  }) => HomeFirstListItem(
    activityTag: activityTag ?? this.activityTag,
    carousel: carousel ?? this.carousel,
    coverImageUrl: coverImageUrl ?? this.coverImageUrl,
    daoHeadImageUrl: daoHeadImageUrl ?? this.daoHeadImageUrl,
    daoId: daoId ?? this.daoId,
    daoName: daoName ?? this.daoName,
    firstPublishCount: firstPublishCount ?? this.firstPublishCount,
    firstPublishPrice: firstPublishPrice ?? this.firstPublishPrice,
    id: id ?? this.id,
    productName: productName ?? this.productName,
    productType: productType ?? this.productType,
    showCount: showCount ?? this.showCount,
    showSoldCount: showSoldCount ?? this.showSoldCount,
    sourceId: sourceId ?? this.sourceId,
  );
}